package com.yonyou.cyxdms.sysAuth.service.mapper;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yonyou.cyx.framework.dao.base.SuperMapper;
import com.yonyou.cyxdms.sysAuth.service.entity.TrDealerOrgRelationPO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 组织品牌关系,维修站车系关系 Mapper 接口
 * </p>
 *
 * @author maxingjian
 * @since 2019-08-29
 */
public interface TrDealerOrgRelationMapper extends SuperMapper<TrDealerOrgRelationPO> {

    void deleteById(@Param("id") Integer id);

    /**
     * 新增-授权品牌
     * adu
     * @return
     */
    public Integer addAuthorizedBrand(TrDealerOrgRelationPO trdealerorgrelationpo);

    /**
     * 删除-授权品牌
     * adu
     * @return
     */
    public Integer deleteAuthorizedBrand(Integer orgRelationId);

    /*
     *   查询车系-品牌是否存在
     */
    public Integer selectByBillId(@Param("orgId") Integer orgId, @Param("billId") Long billId, @Param("sourceId") Long sourceId);

    List<Map<String, Object>> queryAuthorizedById(Page page, @Param("params") Map<String, Object> queryCondition);
}
